﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FurionApiDemo.Core.Implement.html.Dtos
{
    public class DirectoryDto
    {
        public DirectoryDto()
        {
            Items = new List<FileItem>();
        }
        public List<FileItem> Items { get; set; }
    }
    public class FileItem
    {
        public FileItem(string _Title, DateTime _DateTime, string _UUID)
        {
            Title = _Title;
            DateTime = _DateTime;
            UUID = _UUID;
            isDelete = false;
        }
        /// <summary>
        /// 文件标题
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime DateTime { get; set; }
        /// <summary>
        /// UUID
        /// </summary>
        public string UUID { get; set; }
        public bool isDelete { get; set; }
    }
    public class ItemFileInfo
    {
        public ItemFileInfo(string _Title, string _UUID, string _CoverImage, DateTime _DateTime)
        {
            Title = _Title;
            UUID = _UUID;
            CoverImage = _CoverImage;
            DateTime = _DateTime;
            Items = new List<ItemsOutputDto>();
        }
        /// <summary>
        /// 封面图
        /// </summary>
        public string CoverImage { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime DateTime { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// UUID
        /// </summary>
        public string UUID { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        public bool isDelete { get; set; }
        /// <summary>
        /// 内容项
        /// </summary>
        public List<ItemsOutputDto> Items { get; set; } = new List<ItemsOutputDto>();
    }
    public class SaveItemFileInputDto
    {
        public string? UUId { get; set; }
        public string Url { get; set; }
        public string Title { get; set; }
    }
    public class SaveItemInputDto
    {
        public string UUId { get; set; }
        public string? Id { get; set; }
        public string Url { get; set; }
        public string Label { get; set; }
    }
    public class DeletetemInputDto
    {
        public string UUId { get; set; }
        public string Id { get; set; }
    }
    public class UpdateAllItemInputDto
    {
        public string UUId { get; set; }
        public List<ItemsOutputDto> Items { get; set; }
    }
    public class ItemsOutputDto
    {
        public ItemsOutputDto()
        {
        }

        public ItemsOutputDto(string url, string label)
        {
            Id = Guid.NewGuid().ToString("N");
            Url = url;
            Label = label;
        }

        public string Id { get; set; }
        public string Url { get; set; }
        public string Label { get; set; }
    }
}
